package com.kung.qvs.ui.main.fragment;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.kung.qvs.entity.KRecordWeight;
import com.kung.qvs.entity.PrintDataBean;

import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class CollectTrashRecordItemViewModel extends ItemViewModel<CollectTrashRecordViewModel> {

    public ObservableField<KRecordWeight> entity = new ObservableField<>();

    public CollectTrashRecordItemViewModel(@NonNull CollectTrashRecordViewModel viewModel, KRecordWeight bean) {
        super(viewModel);
        this.entity.set(bean);
    }

    public BindingCommand onClickPrint = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            viewModel.uc.eventPrintItem.setValue(entity.get());
        }
    });
}
